switch: Remove css box drawing
authorTimm Bäder <mail@baedert.org>
Wed, 3 May 2017 08:31:24 +0000 (10:31 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:11 +0000 (21:27 -0400)
gtk/gtkswitch.c

index 6a394f7a44ce2cfc2155faf2cb70a8fa3a116953..7b3ecbf419086fe224f159a70498a11d883be484 100644 (file)
@@ -422,30 +422,15 @@ gtk_switch_size_allocate (GtkWidget     *widget,
   gtk_widget_set_clip (widget, &clip);
 }
 
-static gboolean
-gtk_switch_snapshot_trough (GtkCssGadget *gadget,
-                            GtkSnapshot  *snapshot,
-                            int           x,
-                            int           y,
-                            int           width,
-                            int           height,
-                            gpointer      data)
-{
-  GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
+static void
+gtk_switch_snapshot (GtkWidget   *widget,
+                     GtkSnapshot *snapshot)
+{
   GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
 
   gtk_widget_snapshot_child (widget, priv->on_label, snapshot);
   gtk_widget_snapshot_child (widget, priv->off_label, snapshot);
   gtk_widget_snapshot_child (widget, priv->slider, snapshot);
-
-  return FALSE;
-}
-
-static void
-gtk_switch_snapshot (GtkWidget   *widget,
-                     GtkSnapshot *snapshot)
-{
-  gtk_css_gadget_snapshot (GTK_SWITCH (widget)->priv->gadget, snapshot);
 }
 
 static void
@@ -725,7 +710,7 @@ gtk_switch_init (GtkSwitch *self)
                                                      GTK_WIDGET (self),
                                                      gtk_switch_get_content_size,
                                                      gtk_switch_allocate_contents,
-                                                     gtk_switch_snapshot_trough,
+                                                     NULL,
                                                      NULL,
                                                      NULL);